<div data-am-widget="tabs" class="am-tabs am-tabs-d2">
    <ul class="am-tabs-nav am-cf">
        <li class="am-active"><a href="#">两面盘</a></li>
        <li class=""><a href="#">单号1-10</a></li>
        <li class=""><a href="#">冠亚组合</a></li>
    </ul>
    <div class="am-tabs-bd">
        <div data-tab-panel-0 class="am-tab-panel am-active">
            <table class="guanya container">
            <thead>
                <tr>
                    <th colspan="7">冠、亚军和</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
        <ul class="am-avg-sm-5 ten">
        </ul>
        </div>
        <div data-tab-panel-1 class="am-tab-panel ">
            <ul class="am-avg-sm-5 danhao">
            </ul>
        </div>
        <div data-tab-panel-2 class="am-tab-panel ">
            <table class="guanyazuhe container">
            </table>
        </div>
    </div>

    <button class="save am-btn-xl am-btn-primary">保存</button>
</div>

<script>
    var table = $(".guanya tbody");
    var arr = ['大', '小', '单', '双'];
    var tr = $("<tr></tr>");
    for (var i in arr) {
        AdminLimit.add('冠亚' + arr[i], '冠亚' + arr[i], tr);
    }
    table.append(tr);

    var ths = ["冠军", "亚军", "第三名", "第四名", "第五名", "第六名", "第七名", "第八名", "第九名", "第十名"];
    var arr = ['冠', '亚', '三', '四', '五', '六', '七', '八', '九', '十'];
    var types = ["大", "小", "单", "双", "龙", "虎"];
    
    var div = $(".ten");
    div.empty();
    for (var j = 0; j < ths.length; j++) {
        var table = $('<table class="container"></table>');
        table.append('<tr><th>' + ths[j] + '</th></tr>');
        for (var i = 0; i < types.length; i++) {
            if (j > 4 && i > 3) {
                continue;
            }
            var tr = $("<tr></tr>");
            AdminLimit.add(arr[j] + types[i], types[i], tr);
            table.append(tr);
        }
        var li = $("<li></li>");
        li.append(table);
        div.append(li);
    }

    // 单号
    types = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
    var arr2 = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'];
    div = $(".danhao");
    div.empty();
    for (var j = 0; j < ths.length; j++) {
        var table = $('<table class="container"></table>');
        table.append('<tr><th>' + ths[j] + '</th></tr>');
        for (var i = 0; i < types.length; i++) {
            var tr = $("<tr></tr>");
            var t = types[i];
            AdminLimit.add(arr[j] + arr2[i], t, tr);
            table.append(tr);
        }
        var li = $("<li></li>");
        li.append(table);
        div.append(li);
    }

    var table = $(".guanyazuhe");
    table.empty();
    table.append("<tr><th colspan='4'>冠、亚军和</th></tr>");
    var tr = $("<tr></tr>");
    for (var i = 0; i < 20; i++) {
        var n = i + 3;
        if (n > 19) {
            tr.append("<td> </td>");
        }
        else {
            AdminLimit.add("冠亚" + n, n, tr);
        }

        if (i % 4 == 3) {
            table.append(tr);
            tr = $("<tr></tr>");
        }
    }
</script>
